' This program exported from BASIC Anywhere Machine (Version [5.2.3].[2023.12.16.16.28]) on 2024.03.27 at 21:59 (Coordinated Universal Time)

' This program by Charlie Veniot
' Demonstrating the use of "DRAW" to help generate geometrical shapes


SCREEN _NEWIMAGE(601,601,17)

NewDrawing:

  COLOR1 = INT(RND*63 + 1)
  COLOR2 = INT(RND*63 + 1)
  COLOR3 = INT(RND*63 + 1)

  ' Generate the single circle with outer arcs

  FOR A# = 0 TO 360 STEP 0.25
    DRAW "B M 300,300"
    DRAW "B TA" + A# + " U250"
    CIRCLE (POINT(0),POINT(1)),2,COLOR1, , , ,T
    DRAW "B M 300,300"
    DRAW "B TA" + A# + " U215"
    DRAW "B TA" + ((1800-a#*5)) + " U34"
    CIRCLE (POINT(0),POINT(1)),2,COLOR2, , , ,T
    SLEEP 0.001
  NEXT A#

  ' Generate the inner arcs

  FOR A% = 0 TO 300 step 60
    DRAW "B M 300,300"
    DRAW "B TA" + A% + "U 250"
    px = POINT(0) : py = POINT(1)
    FOR A# = 120 + A% TO 240 + A%  STEP 0.25
      DRAW "B M " + px +"," + py
      DRAW "B TA" + A# + " U250"
      CIRCLE (POINT(0),POINT(1)),2,COLOR3, , , ,T
      SLEEP 0.001
    NEXT A#
  NEXT A%

  SLEEP 3
  IF _MOUSEBUTTON THEN WHILE _MOUSEBUTTON : WEND
  CLS

GOTO NewDrawing